//
//  BVBundle.m
//  BVCommon
//
//  Created by 崔晋 on 2019/8/15.
//

#import "BVBundle.h"

@implementation BVBundle

+ (NSBundle *)bundleWithClass:(Class)class name:(nonnull NSString *)bundleName {
    NSBundle *bundle = [NSBundle bundleForClass:class];
    if (!bundle) {
        return [NSBundle mainBundle];
    }
    NSString *bundle_path = [bundle pathForResource:bundleName ofType:@"bundle"];
    bundle = [NSBundle bundleWithPath:bundle_path];
    return bundle;
}

@end
